package com.cauli.file.feignService.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.cauli.model.entity.BaseEntity;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author Cauli
 * @date 2023-03-28 12:00
 * @description 存储源
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "StorageVO", description = "存储源")
public class StorageVO extends BaseEntity {
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "storage_id")
    private Long storageId;

    /**
     * 用户ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField("user_id")
    private Long userId;

    /**
     * 占用存储大小
     */
    @TableField("storage_size")
    private Long storageSize;

    /**
     * 存储源类型（0本地 1阿里云OSS）
     */
    @TableField("storage_type")
    private Integer storageType;

    /**
     * 总存储大小
     */
    @TableField("total_storage_size")
    private Long totalStorageSize;

    /**
     * 存储源状态（0停用 1正常
     */
    @TableField("status")
    private Integer status;
}
